import vue from '@vitejs/plugin-vue';
import Components from 'unplugin-vue-components/vite';
import { VantResolver } from 'unplugin-vue-components/resolvers';

export default {
  plugins: [
    vue(),
    Components({
      resolvers: [VantResolver()],
    }),
  ],
  devServer: {
    proxy: {
      // // 本地代理环境配置
      "/baidu": {
        target: "https://api.map.baidu.com",
        ws: true,
        changOrigin: true, //允许跨域
        pathRewrite: {
          "^/baidu": "", //请求的时候使用这个/baidu 就可以
        },
      },
    }
  }
};





